﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace AdminLogin.AdminLogin
{
    public class ConnectUserDataBase
    {
        public DataTable laydulieu()
        {
            DataTable dt = new DataTable();
            SqlConnection sqlcon = new SqlConnection();
            string url = ConfigurationManager.ConnectionStrings["SqlProviderCon"].ToString();
            using (SqlConnection con = new SqlConnection(url))
            {
                using (SqlDataAdapter da = new SqlDataAdapter())
                {
                    string sql = "select * from userinfor";
                    da.SelectCommand = new SqlCommand(sql, con);

                    da.Fill(dt);
                    return dt;

                }
            }
        }
    }
}